/**
 * Created by liuyun19 on 2018/12/26.
 * ﻿mutations: 处理状态（数据）的变化, 类似函数，改变state数据的唯一途径，且不能用于处理异步事件（重点！！！）
 */
import * as types from './mutations-types';

export default {
  // 首页
  [types.COLLECT_DONATE_COUNT](state, payload) {
    console.log('COLLECT_DONATE_COUNT', state, payload)
    state.collectCount = payload;
  },
  [types.COLLECT_DONATE_COUNT_FAILE](state, err) {
    console.log('COLLECT_DONATE_COUNT_FAILE', err)
  },
  // 全部项目
  [types.FETCH_PROJECT_LIST](state, payload) {
    console.log('全部项目---》', state, payload)
    state.categoryList = payload.categoryList;
    state.categoryData = payload.data;
  }
}
